//
// Created by sai on 2019/2/21.
//

#ifndef LINKLISTED_LINKLIST_H
#define LINKLISTED_LINKLIST_H

#include <stdbool.h>

struct Node;
typedef int ElementType;
typedef struct Node *PtrToNode;
typedef PtrToNode List;
typedef PtrToNode Position;

List MakeEmpty(List L);

bool IsEmpty(List L);

bool IsLast(Position p, List L);

Position Find(ElementType X, List L);

void Delete(ElementType X, List L);

Position FindPrevious(ElementType X, List L);

void Insert(ElementType X, List L, Position P);

void Append(List L, ElementType X);

void DeleteList(List L);

void PrintList(List L);

Position Header(List L);

Position First(List L);

Position Advance(Position p);

ElementType Retrieve(Position P);

#endif //LINKLISTED_LINKLIST_H
struct Node {
    ElementType Element;
    Position Next;
};